<PageHeader as |p|>
  <p.top>
    <nav class="breadcrumb">
      <ul>
        <li>
          <span class="sep">&#x0002f;</span>
          {{#link-to "vault.cluster.access.identity.index"}}
            {{capitalize (pluralize model.identityType)}}
          {{/link-to}}
        </li>
      </ul>
    </nav>
  </p.top>
  <p.levelLeft>
    <h1 class="title is-3">
      {{model.name}}
    </h1>
  </p.levelLeft>
</PageHeader>
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
  <nav class="tabs sub-nav">
    <ul>
      {{#each (tabs-for-identity-show model.identityType model.type) as |tab|}}
        {{#link-to "vault.cluster.access.identity.show" (pluralize model.identityType) model.id tab tagName="li"}}
          {{#link-to "vault.cluster.access.identity.show" (pluralize model.identityType) model.id tab}}
            {{capitalize (humanize tab)}}
          {{/link-to}}
        {{/link-to}}
      {{/each}}
    </ul>
  </nav>
</div>
<Toolbar>
  <ToolbarActions>
    {{#unless (or (and (eq model.identityType "group") (eq model.type "internal")) model.alias)}}
      <ToolbarLink
        @type="add"
        @params={{array "vault.cluster.access.identity.aliases.add" (pluralize model.identityType) model.id}}
        @data-test-entity-create-link=true
      >
        Add alias
      </ToolbarLink>
    {{/unless}}
    <ToolbarLink
      @params={{array "vault.cluster.access.identity.edit" (pluralize model.identityType) model.id}}
      @data-test-entity-edit-link=true
    >
      Edit {{model.identityType}}
    </ToolbarLink>
  </ToolbarActions>
</Toolbar>
{{component (concat 'identity/item-' section) model=model}}
